---
id: 657f0044be09db790b1eb1c5
title: الخطوة 9
challengeType: 20
dashedName: step-9
---

# --description--

Strings in pascal case start with a capital character. Since you've converted all such characters to lowercase and prepended an underscore to them, chances are, the converted snake case string has a dangling underscode at the start.

The easiest way to strip such unwanted character is by using the `.strip()` string method and passing an underscore to the method as argument.

```py
snake_cased_string.strip('_')
```

Make sure to save the resulting string in a variable named `clean_snake_cased_string` on the same level as the `snake_cased_string` variable.

# --hints--

You should assign the resulting string from `snake_cased_string.strip('_')` to a variable named `clean_snake_cased_string`.

```js
({
    test: () => {
        const transformedCode = code.replace(/\r/g, "");
        const convert_to_snake_case = __helpers.python.getDef("\n" + transformedCode, "convert_to_snake_case");
        const { function_body } = convert_to_snake_case;

        assert.match(function_body, / +clean_snake_cased_string\s*=\s*snake_cased_string.strip\(\s*("|')_\1\s*\)/);
    }
})
```

# --seed--

## --seed-contents--

```py
def convert_to_snake_case(pascal_or_camel_cased_string):
    snake_cased_char_list = []
    for char in pascal_or_camel_cased_string:
        if char.isupper():
            converted_character = '_' + char.lower()
            snake_cased_char_list.append(converted_character)
        else:
            snake_cased_char_list.append(char)
--fcc-editable-region--
    snake_cased_string = ''.join(snake_cased_char_list)

--fcc-editable-region--
```
